import Vue from 'vue';
import Vuex, { StoreOptions } from 'vuex';

// import { RootState } from './types'; // 定义state的类型
import modules from './modules';
import * as getters from './getters';
import { RootState } from '@/typings/store';

Vue.use(Vuex);

const store: StoreOptions<RootState> = {
  state: {
    version: '1.0',
  },
  getters,
  modules,
};

export default new Vuex.Store<RootState>(store);
